<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function fn(age, vip) {
      return {
        name: this.name,
        age,
        type: vip
      }
    }
    let obj = {
      name: "wsh"
    }
    let newApply = function(obj) {
      obj = obj || window
      obj.fn = this
      let res = obj.fn(...arguments[1])
      delete obj.fn
      return res
    }
    Function.prototype.newApply = newApply
    console.log(fn.newApply(obj, [1, 2, 3, 4]));
  </script>
</body>
</html>